﻿using System;
using System.Data;
using System.Data.Common;
using System.Linq;
using LetsDoIt.Logging;
using Microsoft.Data.Extensions;
using MySql.Data.MySqlClient;

namespace LetsDoItWS
{
    public partial class ldirdbEntities
    {
        public void UpdateTrashPointCountyByID(int id)
        {
            DbCommand command = this.CreateStoreCommand(
                "UpdateTrashPointCountyByID", 
                CommandType.StoredProcedure,
                new MySqlParameter("trashPointID", id));
            try
            {
                command.Connection.Open();
                command.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                LoggerManager.Current.ErrorFormat(typeof(object), "WS Error : {0}", ex);
            }
            finally
            {
                if (command.Connection != null
                    && command.Connection.State != ConnectionState.Closed)
                {
                    command.Connection.Close();
                }
            }

            
        }
    }
}
